import one from './one';
import two from './two';

const initState = {
  one: one.state,
  two: two.state,
}

const reducers = (state = initState, action) => {
  const { type } = action;
  const [ action_type, action_namespace ] = type.split('/').reverse();
  if (_.isEmpty(action_namespace)) {
    return state;
  } else {
    return {
      ...state,
    };
  }
  return {
    ...state
  }
  switch ( action_namespace) {
    case 'one':
      return { ...state, one: one(state.one, { ...action, type: action_type }) };
    case 'two':
      return { ...state, two: two(state.two, { ...action, type: action_type }) };
    default:
      return {
        ...state,
        one: one(state.one, { ...action, type: action_type }),
        two: two(state.two, { ...action, type: action_type }),
      };
  }
}
